<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>{$result.title} - 掌中游旅游</title>
		<meta name="keywords" content="{$result.title}"/>
		<meta name="description" content="欢迎前来掌中游实力旺铺，选购{$result.title}实力旺铺，更多旅游任你选购"/>

		<link href="__PUBLIC__/Home/css/index.css" rel="stylesheet" type="text/css">

<link rel="stylesheet" href="__PUBLIC__/Home/css/fangdajing.css">
<script src="__PUBLIC__/Home/js/jquery-1.8.2.min.js"></script>
<script src="__PUBLIC__/Home/js/jquery.colorbox-min.js"></script>
<script src="__PUBLIC__/Home/js/fangdajing.js"></script>

<script>
window.onscroll = function(){
    var scrollTop = document.body.scrollTop;
    if(scrollTop >= 740){
		$('#tabs').attr('style','position:fixed; top:0; width:940px;');
    }else{
		$('#tabs').attr('style','position:static;');
	}
}
</script>
	</head>

	<body>

	
	<include file="Public:header" />
	
	
		<!-- 当季热卖 -->


<!-- 内容区 -->
<div class="Content">
	<div class="daohang">当前的位置：<a href="{:U('Index/lvyou')}">旅游首页</a> > <a href="{:U('Index/lvyou_list')}">旅游产品列表</a> > 详情</div>
	



<div class="Detail-Detail">
<div style="width:320px; float:left;">


<div class="box">


<div class="con-FangDa" id="fangdajing">
  <div class="con-fangDaIMg" style="border:1px solid #CCC;">
    <!-- 正常显示的图片-->
    <img style="max-width:312px;height: 218px;position: relative;top:50px;" src="__PUBLIC__/Uploads/goods/{$result.pic_url}">
    <!-- 滑块-->  
    <div class="magnifyingBegin"></div>
    <!-- 放大镜显示的图片 -->
    <div class="magnifyingShow"><img src="__PUBLIC__/Uploads/goods/{$result.pic_url}"></div>
  </div>
  
  <ul class="con-FangDa-ImgList">
    <!-- 图片显示列表 -->
      <foreach name="pic_tuji" item="vo_tuji">
    <li><img style="max-width:52px;" src="__PUBLIC__/Uploads/goods/{$vo_tuji}" data-bigimg="__PUBLIC__/Uploads/goods/{$vo_tuji}"></li>
      </foreach>
  </ul>
</div>


</div>





  <div class="Original">
  	<img src="__PUBLIC__/Home/img/7.jpg" width="16" height="16">
    <img src="__PUBLIC__/Home/img/new.jpg" width="16" height="16">
    <img src="__PUBLIC__/Home/img/card.jpg" width="16" height="16">
    <img src="__PUBLIC__/Home/img/11111.jpg" width="16" height="16">
    <span>我们的服务</span>
    </div>
</div>
<div class="Detail-title">
    <form method="post" action="{:U('Cart/before_order_lvyou')}" onSubmit="return check_form();">
	<h3 class="black size21" style="font-weight:600; font-size:20px;">{$result.title}</h3>
	<input type="hidden" name="type" id="type" value="1">
	<input type="hidden" name="detail_title" id="detail_title" value="{$result.title}">
    <ul>
	<li class="title-title" style="line-height:30px; padding-top:5px; padding-bottom:5px;">
        	<span class="left gray1" style="font-size:16px;">市场价：</span><del class="left gray1" style="margin-right:15px; font-size:16px;">¥{$result.price_old}</del>
          <div style="clear:both;"></div>
			<span class="left" style="font-size:16px;">会员价：</span><span id="chufa_price_html" class="red size20 left" style=" font-weight:600;">¥{$result.price_new}</span>
          <input type="hidden" id="price_old" value="{$result.price_old}">
          <input type="hidden" id="price_new" value="{$result.price_new}">
        </li>
		<script src="__PUBLIC__/Common/My97Date/WdatePicker.js"></script>
<foreach name="chufa_taocan" item="vo_chufa">
  <input type="hidden" name="chufa_date" id="{$vo_chufa.chufa_date}" value="{$vo_chufa.chufa_price}">
</foreach>

		<li style="margin-top:10px; font-size:16px;">

    出发日期：

<if condition="$chufa_date_str != ''">
		<input type="text" name="chufa_date" id="chufa_date_1" value="" style="width:120px; border:1px solid #CCC; color:#F00; font-weight:600;" class="Wdate" onFocus="WdatePicker({onpicking:function(dp){aa(dp.cal.getNewDateStr())},doubleCalendar:true,opposite:true,disabledDates:[{$chufa_date_str}]})" />
		<script>
    function aa(date){
      var chufa_price = $('#aa_'+date).val();
      var chufa_price_et = $('#bb_'+date).val();

      $('#chufa_price').val(chufa_price);
      $('#chufa_price_et').val(chufa_price_et);

      $('#chufa_price_span').html(chufa_price); //成人价

      $('#chufa_price_et_span').html(chufa_price_et);   //儿童价
      

      $('#taocan_price').html(chufa_price); //价格显示

      $('#price_new').val(chufa_price);
      $('#price_new').val(chufa_price);
      $('#chufa_price_html').html('￥'+chufa_price);
      $('#price_sum1').val(chufa_price);     
      $('#chufa_date_input').val(date);   
    }
    </script>
</if>


  <foreach name="chufa_taocan" item="vo_chufa_2">
    <input type="hidden" id="aa_{$vo_chufa_2.chufa_date}" value="{$vo_chufa_2.chufa_price}" />
    <input type="hidden" id="bb_{$vo_chufa_2.chufa_date}" value="{$vo_chufa_2.chufa_price_et}" />
  </foreach>






    &nbsp;&nbsp;&nbsp;&nbsp;
		<span style="float:right;">出发城市：{$result.chufa_address}</span>
    </li>

    <li class="size12" style="overflow:hidden; margin:20px 0; font-size:16px;"><span class="left">成人：</span>
      <div class="Quantity left" style="margin:0 8px;"> 
      	<a href="javascript:void(0);"  onclick="jian_nub()" style="border:1px solid #ccc;padding:2px 10px;">-</a>
        <input name="goods_num" type="text" value="1" style=" border:1px solid #CCC; width:30px; height:24px; position:relative; top:-2px;z-index:-100;">
      	<a href="javascript:void(0);" onclick="jia_nub()" style="border:1px solid #CCC;padding:2px 10px;">+</a>
      </div>
      &nbsp;<span style="color:#F00; font-size:16px;" id="chufa_price_span">{$resone.price_new}</span> 元/人(单价)
      &nbsp;&nbsp;&nbsp;<b style="float:right;">送积分：( <span style="color:#E32B36; font-weight:600;">{$result.fanli_jifen} 积分 </span>)</b>
    </li>

    <li class="size12" style="overflow:hidden; margin:20px 0; font-size:16px;"><span class="left">儿童：</span>
      <div class="Quantity left" style="margin:0 8px;"> 
        <a href="javascript:void(0);"  onclick="jian_nub_et()" style="border:1px solid #ccc;padding:2px 10px;">-</a>
        <input name="goods_num_et" type="text" value="0" style=" border:1px solid #CCC; width:30px; height:24px; position:relative; top:-2px;z-index:-100;">
        <a href="javascript:void(0);" onclick="jia_nub_et()" style="border:1px solid #CCC;padding:2px 10px;">+</a>
      </div>
      &nbsp;<span style="color:#F00; font-size:16px;" id="chufa_price_et_span">{$resone.chufa_price_et}</span> 元/人(单价)
    </li>  
        

<li>
<style>
.guige{padding:5px 10px; border:1px solid #FF7519;}
.guige:hover{ background:#FF7519; color:#FFF; cursor:pointer;}
</style>		
		<div style="font-size:14px; font-weight:600; color:#666;">
		<foreach name="taocan_arr" item="taocan_arr">
			<span class="guige">{$taocan_arr.taocan}</span>		
		</foreach>
		</div>
<script>
function check_form(){
	var chufa_date_1 = $('#chufa_date_1').val();
	if(chufa_date_1 == ''){
		alert('请选择出发日期');
		return false;
	}
	return true;
}
</script>		
<script>
	//加入收藏
    function join_collection(id){
        var pic_url = $('#pic_url').val();
        var price_old = $('#price_old').val();
        var price_new = $('#price_new').val();
        var detail_title = $('#detail_title').val();
        $.post("{:U('Cart/join_coll')}", { "goods_id":id,"pic_url":pic_url,"price_old":price_old,"price_new":price_new,"detail_title":detail_title},
                function(data){
                   if(data==1){
                       alert('该商品已经被收藏');
                   }else if(data==2){
                       alert('收藏成功');
                   }else{
                       alert('收藏失败');
                   }
         }, "json");

    }
</script>

        <div style="margin-top:10px; padding-top:10px;">
		<form method="post" action="{:U('Cart/before_order')}">

            <input type="hidden" name="id[]" value="{$result.id}">
            <input type="hidden" name="goods_title[]"  value="{$result.title}">
            <input type="hidden" name="price_new[]" id="price_new"  value="{$result.price_new}">

            <input  type="hidden" name="goods_num[]" id="goods_num" value="1" />
            <input  type="hidden" name="goods_num_et[]" id="goods_num_et" value="0" />

            <input type="hidden" name="chufa_price[]" id="chufa_price" value="0">
            <input type="hidden" name="chufa_price_et[]" id="chufa_price_et"  value="0">

            <input type="hidden" name="pic_url[]" id="pic_url" value="{$result.pic_url}" >
            <input type="hidden" name="price_sum" id="price_sum1" value="{$result.price_new}" >
            <input type="hidden" name="chufa_address[]" value="{$result.chufa_address}">
            <input type="hidden" name="chufa_date[]" id="chufa_date_input" value="">
            <input type="hidden" name="fanli_jifen[]" id="fanli_jifen" value="{$result.fanli_jifen}">
            <input type="hidden" name="order_type" value="1">
            <input type="hidden" name="now_buy" id="now_buy" value="1" >




			<input type="button"  id="button" value="收藏" class="buy"  onclick="join_collection({$result.id})" style=" width:80px; color:#ff7519; border:2px solid #ff7519; float:left; font-weight:normal;">






<if condition="$res_member['grade_name'] == '合伙人' || $res_member['grade_name']=='会员'"> 


<if condition="$chufa_date_str != ''">


  <switch name="result['shangjia']" >
  <case value="1">
    <input type="submit" id="button" value="立即预订" class="buy" style="width:250px; border:2px solid #ff7519; float:left; margin-left:10px; font-weight:normal; background:#FF7519; color:#FFF;">
  </case>
  <default />
  <span style="padding:10px 30px; background:#555; margin-left:20px; position: relative; top:5px; color:#FFF; font-size:16px; z-index:-22;">抱歉 , 此商品已下架</span>
  </switch>


<else/>

    
<span style="padding:10px 20px; background:#555; margin-left:20px; position: relative; top:5px; color:#FFF; font-size:16px; z-index:-22;">无可用出发日期，请联系客服</span>

</if>



    

<else/>
 <a href="{:U('User/huiyuan_zige')}"><span style="padding:10px 20px; background:#666;color:#FFF; margin-left:20px; z-index: -100; position:relative; top:5px; font-size:16px;">请晋升为会员，继续购物</span></a>
</if>



		</form>
		</div>
		</li>
    </ul>
</div>

<div style=" float:right;">
<foreach name="list_rexiao" item="vo">
<div><a href="{:U('Index/lvyou_details')}?id={$vo.id}">
<img src="__PUBLIC__/Uploads/goods/{$vo.pic_url}" style=" width:177px;"/></a><br/>
<span style="color:red;font-weight:bold;">本站优惠价:¥{$vo.price_new}</span>
</div>
</foreach>
</div>

<!--缩图结束-->
</div>

<div class="left Simultaneously" id="left_tuijian">
  <h3>同时购买推荐</h3>
  <foreach name="list" item="vo">
  <a href="{:U('Index/lvyou_details')}?id={$vo.id}">
	  <img src="__PUBLIC__/Uploads/goods/{$vo.pic_url}" style="margin-right:5px; width:160px; height:120px;"><br/>
  </a>
   </foreach> 
</div>

<div class="Detail-Content" style="float:left; width:970px !important;">
<ul id="tabs" style=" width:970px;">
    <li id="current"><a href="javascript:;" title="tab1">产品详情</a></li>
    <li id=""><a href="javascript:;" title="tab2">行程介绍</a></li>
    <li id=""><a href="javascript:;" title="tab3">推荐理由</a></li>
	<li id=""><a href="javascript:;" title="tab4">预定须知</a></li>
	<li id=""><a href="javascript:;" title="tab5">费用说明</a></li>
	<li id=""><a href="javascript:;" title="tab6">用户评论</a></li>
</ul>

<div id="content">
    <div id="tab1" style="display: block;">
      	{$result.shuoming}
      </div>
    <div id="tab2" style="display: none;">
    	{$result.guige}
	</div>
	<div id="tab3" style="display: none;">
	
    	{$result.tuijian_liyou}
	</div>
	<div id="tab4" style="display: none;">
    	{$result.yuding_xvzhi}
	</div>
	<div id="tab5" style="display: none;">
    	{$result.feiyong_shuoming}
	</div>
    <div id="tab6" style="display: none;">
    <ul class="score2">
    	<h3>商品综合满意度</h3>
        <span class="left">
        	<p><b class="star">4.9</b><b>分</b><img src="__PUBLIC__/Home/img/star.jpg"><img src="__PUBLIC__/Home/img/star.jpg"><img src="__PUBLIC__/Home/img/star.jpg"><img src="__PUBLIC__/Home/img/star.jpg"></p>
            <p><a href="#">共有517位买家参与评价</a></p>
        </span>
        <span class="left">
        <ul class="scoremiddle">
          <ul class="stage"><span style="width:487.57062146892655367231638418px;">&nbsp;</span><ul class="detailscore" style="left:487.57062146892655367231638418px;">4.9</ul></ul>
          <ul>
           <li>1分<br>非常不满意</li>
           <li>2分<br>不满意</li>
           <li>3分<br>一般</li>
           <li>4分<br>满意</li>
           <li>5分<br>非常满意</li>
           <div class="c" style="display: none;"></div>
          </ul>
       </ul>
        </span>
        <span class="right">
            <p><input type="submit" name="button" id="button" value="我要去评价" class="reservation-button" style="border:0; font-size:14px; background-color:#f8b551;"></p>
        	<p><a href="#">查看该商品所有评价</a></p>
        </span>
    </ul>    
             <p class="ccontent"><b class="bold Orange1">评价内容</b><b>共有14个评价信息</b></p>
<ul class="commenttitle">
  <b class="bold">zanon*</b><b class="bold">评分：</b>  						
  <img src="__PUBLIC__/Home/img/star.jpg" width="17" height="14"> <img src="__PUBLIC__/Home/img/star.jpg" width="17" height="14"> <img src="__PUBLIC__/Home/img/star.jpg" width="17" height="14"> <img src="__PUBLIC__/Home/img/star.jpg" width="17" height="14">
      <b class=" right">评价于 2016-07-05</b>
          <p><b class="advantage">优点</b><b>性价比较高性价比较高</b></p>
    <p><b class="advantage">不足</b><b>暂时还没有发现缺点哦！</b></p>
    <p><b class="advantage">心得</b><b>性价比较高</b></p>
    </ul>   
     </div>
    
</div>
</div>

</div>

<script>
var demo = document.getElementById("demo");
var demo1 = document.getElementById("demo1");
var demo2 = document.getElementById("demo2");
demo2.innerHTML=document.getElementById("demo1").innerHTML;
function Marquee(){
if(demo.scrollLeft-demo2.offsetWidth>=0){
 demo.scrollLeft-=demo1.offsetWidth;
}
else{
 demo.scrollLeft++;
}
}
var myvar=setInterval(Marquee,30);
demo.onmouseout=function (){myvar=setInterval(Marquee,30);}
demo.onmouseover=function(){clearInterval(myvar);}
</script>
<script>
$(function() {
	$("#content div").hide(); // Initially hide all content
	$("#tabs li:first").attr("id","current"); // Activate first tab
	$("#content div:first").fadeIn(); // Show first tab content
    
    $('#tabs a').click(function(e) {
        e.preventDefault();        
        $("#content div").hide(); //Hide all content
        $("#tabs li").attr("id",""); //Reset id's
        $(this).parent().attr("id","current"); // Activate this
        $('#' + $(this).attr('title')).fadeIn(); // Show content for current tab
    });
});
</script>


<script>
    //点击添加或者减少
    //点击添加或者减少
    //点击添加或者减少
   function jian_nub(){
        var goods_num = $('input[name="goods_num"]').val();
        goods_num = Number(goods_num) - 1;
        if(goods_num < 1){
          alert('数量不能小于 1');
          return false;
        }
        $('input[name="goods_num"]').val(goods_num);
        $('#goods_num').val(goods_num); 
    }
  
    function jia_nub(){
        var goods_num = $('input[name="goods_num"]').val();
        goods_num = Number(goods_num) + 1;
        if(goods_num > 99){
          alert('数量不能大于 99');
          return false;
        }
        $('input[name="goods_num"]').val(goods_num);
        $('#goods_num').val(goods_num);
    }

    //点击添加或者减少
   function jian_nub_et(){
        var goods_num_et = $('input[name="goods_num_et"]').val();
        goods_num_et = Number(goods_num_et) - 1;
        if(goods_num_et < 0){
          alert('数量不能小于 0');
          return false;
        }
        $('input[name="goods_num_et"]').val(goods_num_et); 
        $('#goods_num_et').val(goods_num_et);   
    }
  
    function jia_nub_et(){
      var chufa_price_et = $('#chufa_price_et').val();
      if(chufa_price_et == '' || chufa_price_et == 0){
        alert('该日期儿童票不可用');
        return false;
      }
        var goods_num_et = $('input[name="goods_num_et"]').val();
        goods_num_et = Number(goods_num_et) + 1;
        if(goods_num_et > 99){
          alert('数量不能大于 99');
          return false;
        }
        $('input[name="goods_num_et"]').val(goods_num_et);
        $('#goods_num_et').val(goods_num_et);
    }


    /**
     *计算出商品的总价格
     *
     */
    function price_sum(b){
        var price_new = $('#price_new').val();
        //alert(price_new)
        var sum = parseFloat(price_new)*parseInt(b);
        $('#price_sum1').val(sum);
    }
 /*   //添加到购物车
    function add_cart(id){
      var buy_nub =   $('#buy_nub').val();//添加到购物车的数量
      var goods_title = $('#goods_title').val();
      var pic_url = $('#pic_url').val();
        $.post("{:U('Cart/add_cart')}", { goods_id:id,goods_title:goods_title,pic_url:pic_url,goods_num:buy_nub },function(data){
            if(data == 1){
                alert('成功加入购物车');
            }else if(data == 2){
                alert('请先登录');
                window.location.href="{:U('Public/login')}";
            }else{
                alert('加入失败');
            }
        },"json");
    }*/
	
	//加入收藏
    function join_collection(id){
		var is_type=$('#type').val();
        var pic_url = $('#pic_url').val();
        var price_old = $('#price_old').val();
        var price_new = $('#price_new').val();
        var detail_title = $('#detail_title').val();
        $.post("{:U('Cart/join_coll')}", { "goods_id":id,"pic_url":pic_url,"price_old":price_old,"price_new":price_new,"detail_title":detail_title,"is_type":is_type},
                function(data){
                   if(data==1){
                        alert('该商品已经被收藏');
                    }else if(data==2){
                        alert('收藏成功');
                    }else if(data==4){
                        window.location.href="{:U('Public/login')}"
                    }else{
                        alert('收藏失败');
                    }
         }, "json");

    }
</script>
	

		
		<include file="Public:footer" />
		
	</body>

</html>